$(document).ready(function(){
    var form = "#form_signup";
    $("a#sign-in").click(function(){
    var username=$("#name").val();
    var pass=$("#pass").val();
	
	if((username=="")&&(pass=="")){
		$(form + " warning,.nameError").fadeIn('slow').delay(2000).fadeOut('slow');
        $("#name").focus();
		$(form + " warning,.passwordError").fadeIn('slow').delay(2000).fadeOut('slow');
	}else if(username==""){
       $(form + " warning,.nameError").fadeIn('slow').delay(2000).fadeOut('slow');
        $("#name").focus();
    }else if(pass==""){
      $(form + " warning,.passwordError").fadeIn('slow').delay(2000).fadeOut('slow');
        $("#pass").focus();
    }
	else if((username!="")&&(pass!=""))
	{
     // window.location.href=url;
      //return false;
		document.forms["sign-up"].submit();
    }
});
});